package com.financial.service.heemoney.controller.pay;

import com.financial.service.heemoney.dto.inparameter.HeemoneyPayInParamDTO;
import com.financial.service.heemoney.dto.inparameter.HeemoneyPayQueryInParamDTO;
import com.financial.service.heemoney.service.FinancialPayHeemoneyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @api {post}
 * @apiExample author zhaopengjun
 * tar 汇收银支付信息
 * date 11:28 2019/11/7
 * @apiGroup
 * @apiVersion 1.0.0
 * @apiHeader
 * @apiParam
 * @apiSuccess
 */

@RestController
@RequestMapping("/heemoneyPay")
public class HeemoneyPayController {
	@Autowired
	private FinancialPayHeemoneyService financialPayHeemoneyService;

	@PostMapping("/pay")
	public Map<String, Object> pay(@RequestParam HeemoneyPayInParamDTO HeemoneyPayInParamDTO ) {
		return financialPayHeemoneyService.pay(HeemoneyPayInParamDTO);
	}

	@PostMapping("/query")
	public Map<String, Object> query(@RequestParam HeemoneyPayQueryInParamDTO heemoneyPayQueryInParamDTO ) {
		return financialPayHeemoneyService.query(heemoneyPayQueryInParamDTO);
	}

	/**
	 *  汇收银支付异步回执接口
	 * @param asynParam
	 * @return
	 */
	@PostMapping("/payBackAsyn")
	public Map<String, Object> payBackAsyn(@RequestParam String asynParam) {
		return financialPayHeemoneyService.payBackAsyn(asynParam);
	}


	
}
